File

public interface File

File data.

Depending on how the File instance is created, it can correspond to one of the following:

  1. File path, if the file is selected from an <input type="file"> element in a submitted form.
  2. File bytes, if the request is created via the JavaScript API, and a file is passed as a part of the multipart/form-data body.

Types

Link copied to clipboard
public final class Builder
A builder of File.

Functions

Link copied to clipboard
public Optional<Array<byte>> bytesValue()
Returns the file value as an array of bytes.
Link copied to clipboard
Returns the content type.
Link copied to clipboard
public String name()
Returns the file name.
Link copied to clipboard
public static File.Builder newBuilder()
Creates a new File builder.
Link copied to clipboard
Returns the file value as a file path.